import 'package:hrf_app/common/api/http_head.dart';
import 'package:hrf_app/common/services/wp_http.dart';

class BugApi {
  //bug分页查询
  static Future<Map<String, dynamic>> getPjProjectBugPageListApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/getPjProjectBugPageList",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
  //根据id查询详情

  static Future<Map<String, dynamic>> getPjProjectBugByIdApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/getPjProjectBugById",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
  //根据id查询删除

  static Future<Map<String, dynamic>> delPjProjectBugApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/delPjProjectBug",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
  //单一修改
  static Future<Map<String, dynamic>> updatePjProjectBugSingleApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/updatePjProjectBugSingle",
      data: data,
    );
    var aa = res.data;
    return aa;
  }

//修改项目指派人员
  static Future<Map<String, dynamic>> updatePjProjectBugAssignUserIdApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/updatePjProjectBugAssignUserId",
      data: data,
    );
    var aa = res.data;
    return aa;
  }

//解决bug
  static Future<Map<String, dynamic>> solvePjProjectBugApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/solvePjProjectBug",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
//关闭bug
  static Future<Map<String, dynamic>> closePjProjectBugApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/closePjProjectBug",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
//激活bug
  static Future<Map<String, dynamic>> activePjProjectBugApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/activePjProjectBug",
      params: data,
    );
    var aa = res.data;
    return aa;
  }

//暂停bug
  static Future<Map<String, dynamic>> suspendPjProjectBugApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/suspendPjProjectBug",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
//暂停bug
  static Future<Map<String, dynamic>> restartPjProjectBugApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProjectBug/restartPjProjectBug",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
//根据人员选择项目
  static Future<Map<String, dynamic>> getPjProjectByUserIdApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/pjProject/getPjProjectByUserId",
      params: data,
    );
    var aa = res.data;
    return aa;
  }

//项目人员表
  static Future<Map<String, dynamic>> getPjProjectUserListApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectUser/getPjProjectUserList",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
//上传
  static Future<Map<String, dynamic>> simpleUploadApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/ossUploadFile/simpleUpload",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
//上传多
  static Future<Map<String, dynamic>> simpleUploadListApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/ossUploadFile/simpleUploadList",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
//保存
  static Future<Map<String, dynamic>> addPjProjectBugApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/addPjProjectBug",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
}
